/**
 * 
 */
package org.vectrics.recruiter.struts.tag.employee;

import java.util.List;

import org.vectrics.common.pagelist.PageList;

import com.hexacta.hrs.services.employee.impl.EmploymentConditionDTO;

/**
 * PageList de EmploymentConditionHistory
 * 
 * @author pgoette
 * 
 */
public class EmploymentConditionHistoryPageList extends PageList {

    List<EmploymentConditionDTO> employmentConditionHistorys;

    public EmploymentConditionHistoryPageList(List<EmploymentConditionDTO> employmentConditionHistory) {
        this.employmentConditionHistorys = employmentConditionHistory;
    }

    /**
     * @see org.vectrics.common.pagelist.PageList#getElements(int, int)
     */
    @Override
    public List getElements(int start, int end) {
        if (this.employmentConditionHistorys != null) {
            return this.employmentConditionHistorys.subList(start, end + 1);
        }
        return null;
    }

    /**
     * @see org.vectrics.common.pagelist.PageList#getTotalElementCount()
     */
    @Override
    public int getTotalElementCount() {
        if (this.employmentConditionHistorys != null) {
            return this.employmentConditionHistorys.size();
        }
        return 0;
    }

}
